#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "serial.h"


MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow) {
    ui->setupUi(this);

    setFixedSize(this->width(), this->height());

    Serial *serial = ui->widget_serial;
    serial->init();

    PointCloudVisualization *pVisualization = ui->widget_vistualizetion;
    pVisualization->init();

    connect(serial, &Serial::pointDataReady, pVisualization, &PointCloudVisualization::drawPoints);
}

MainWindow::~MainWindow() {
    delete ui;
}

